﻿namespace Coding4Fun.Cannon.Robot.Types
{
	public class RobotTypes
	{
		public enum MotorChannel
		{
			/// <summary>
			/// Motor A
			/// </summary>
			A,
			/// <summary>
			/// Motor B
			/// </summary>
			B,
			Invalid
		}

		public enum MotorTuningAdjustment
		{
			Foward_5_25 = 14,
			Foward_4_5 = 13,
			Foward_3_75 = 12,
			Foward_3 = 11,
			Foward_2_25 = 10,
			Foward_1_5 = 9,
			Foward_0_75 = 8,
			None = 07,
			Backwards_0_75 = 6,
			Backwards_1_5 = 5,
			Backwards_2_25 = 4,
			Backwards_3 = 3,
			Backwards_3_75 = 2,
			Backwards_4_5 = 1,
			Backwards_5_25 = 0,
		}

		public enum AccelerationCurve
		{
			/// <summary>
			/// 2.05 seconds
			/// </summary>
			Acc_00_78 = 48,
			/// <summary>
			/// 1.02 seconds
			/// </summary>
			Acc_01_56 = 32,
			/// <summary>
			/// 0.68 seconds
			/// </summary>
			Acc_02_34 = 16,
			/// <summary>
			/// 0.51 seconds
			/// </summary>
			Acc_03_13 = 0,
			/// <summary>
			/// 0.41 seconds
			/// </summary>
			Acc_03_91 = 49,
			/// <summary>
			/// 0.34 seconds
			/// </summary>
			Acc_04_69 = 33,
			/// <summary>
			/// 0.29 seconds
			/// </summary>
			Acc_05_47 = 17,
			/// <summary>
			/// 0.26 seconds
			/// </summary>
			Acc_06_25 = 1,
			/// <summary>
			/// 0.23 seconds
			/// </summary>
			Acc_07_03 = 50,
			/// <summary>
			/// 0.20 seconds
			/// </summary>
			Acc_07_81 = 34,
			/// <summary>
			/// 0.19 seconds
			/// </summary>
			Acc_08_59 = 18,
			/// <summary>
			/// 0.17 seconds (DEFAULT)
			/// </summary>
			Acc_09_38 = 2,
			/// <summary>
			/// 0.16 seconds
			/// </summary>
			Acc_10_16 = 51,
			/// <summary>
			/// 0.15 seconds
			/// </summary>
			Acc_10_94 = 35,
			/// <summary>
			/// 0.14 seconds
			/// </summary>
			Acc_11_72 = 19,
			/// <summary>
			/// 0.128 seconds
			/// </summary>
			Acc_12_50 = 3,
			/// <summary>
			/// 0.120 seconds
			/// </summary>
			Acc_13_28 = 52,
			/// <summary>
			/// 0.113 seconds
			/// </summary>
			Acc_14_06 = 36,
			/// <summary>
			/// 0.107 seconds
			/// </summary>
			Acc_14_84 = 20,
			/// <summary>
			/// 0.102 seconds
			/// </summary>
			Acc_15_63 = 4,
			/// <summary>
			/// 0.097 seconds
			/// </summary>
			Acc_16_41 = 53,
			/// <summary>
			/// 0.093 seconds
			/// </summary>
			Acc_17_19 = 37,
			/// <summary>
			/// 0.089 seconds
			/// </summary>
			Acc_17_97 = 21,
			/// <summary>
			/// 0.085 seconds
			/// </summary>
			Acc_18_75 = 5
		}


		public enum Parameter
		{
			//InputControlMode = 0x00, // Not Implemented on c# level
			//MotorControl = 0x01, // Not Implemented on c# level
			AmpsLimit = 0x02,
			Acceleration = 0x03,
			//InputSwitchFunction = 0x04,// Not Implemented on c# level
			//Brake_Coast = 0x05, // Not Implemented on Motor Controller
			//JoystickDeadband = 0x06, // Not Implemented on c# level
			ExponentiationChannelOne = 0x07,
			ExponentiationChannelTwo = 0x08,
			MotorTuningAdjust = 0x0B
		}

		public enum Exponentiation
		{
			Linear = 0,
			StrongExponential = 1,
			NormalExponential = 2,
			NormalLogarithmic = 3,
			StrongLogarithmic = 4
		}
	}
}


